<?phpheader("Content-Type: text/html;charset=utf-8");require_once ('./conn.php');$sql1 = "Select * from onlinelist";$query = mysqli_query($connect, $sql1);while ($list = mysqli_fetch_array($query)) {    $username=$list['username'];    $x=$list['x'];    $y=$list['y'];    $name=$list['name'];            $name=preg_replace("#\\\u([0-9a-f]{4})#ie", "iconv('UCS-2BE', 'UTF-8', pack('H4', '\\1'))", $name);    $arr = array ('username'=>$username,'x'=>$x,'y'=>$y,'name'=>$name);    $friendList[]=$arr;}// echo json_encode($friendList);echo preg_replace("#\\\u([0-9a-f]{4})#ie", "iconv('UCS-2BE', 'UTF-8', pack('H4', '\\1'))", json_encode($friendList));?>